#ifndef FORMDCSNETSETTING_H
#define FORMDCSNETSETTING_H

#include <QWidget>
#include <QTimer>
#include <QVector>

#include "udpworker.h"
#include "dcsdb/dcsdboperator.h"
#include "dialogvkb.h"

namespace Ui
{
    class FormDCSNetSetting;
}

class FormDCSNetSetting : public QWidget
{
Q_OBJECT

public:
    explicit FormDCSNetSetting(QWidget *parent = nullptr);

    ~FormDCSNetSetting() override;

private slots:

    void on_pushButtonDCSNetSettingReturn_clicked();

    void on_pushButtonDCSNetSettingModify_clicked();

    void on_cmdSendTimerout();

    void on_autoAddrTimerout();

    void on_dataRecved(QByteArray &data);

    void show_numberkeyboard_ui(const QString &data);

    void confirmString(const QString &gemfield);

    static void onSlaveNumSettingChanged(const QString &text);

    void onInterFaceChanged(int index);

private:
    Ui::FormDCSNetSetting *ui;
    DCSDbOperator *mDbopt;
    UdpWorker *mUdp;
    quint8 mSlaveNum{0};      /*分控个数*/
    int mcurReadId;
    QVector<int> mReadOkIdvec;          /*回读成功到的id*/
    QVector<int> mReadFailedIdvec;      /*回读失败的id*/
    QTimer mCmdSendTimer;
    QTimer mAutoAddrTimer;

    DialogVKB *numberkeyboard;
    QString lineEdit_object;//判断哪个lineedit调用了软件盘
};

#endif // FORMDCSNETSETTING_H
